<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!--只配置扩展dao信息  -->
<mapper namespace="${config.pack}.mappers.${beanName}Mapper">

${"\t"}<update id="edit" parameterType="${beanName}">
${"\t"}${"\t"}UPDATE ${config.tblName} SET
			<#list columnList as column>
			<#if column_index!=0>
${"\t"}${"\t"}${"\t"}${"\t"}${column.dbColumnName} = ${r"#{"}${column.javaPropertyName}, jdbcType=${column.mybatisJdbcType}${r"}"}<#if column_has_next>,</#if> 
			</#if>
			</#list>
${"\t"}${"\t"}WHERE ${columnList[0].dbColumnName} = ${r"#{"}${columnList[0].javaPropertyName}${r"}"} 
${"\t"}</update>

${"\t"}<select id="pageList" resultMap="${simpleBeanName}ShowVoResultMap" parameterType="${beanQueryVo}">
${"\t"}${"\t"}SELECT ROW_NUMBER() OVER (order by UUID desc) AS RowNum,* FROM ${config.tblName} 
${"\t"}${"\t"}<where>
			<#list columnList as column>
${"\t"}${"\t"}${"\t"}<if test="${column.javaPropertyName} != null and ${column.javaPropertyName} !='' ">
${"\t"}${"\t"}${"\t"}${"\t"}${"\t"}AND	${column.dbColumnName} = ${r"#{"}${column.javaPropertyName}, jdbcType=${column.mybatisJdbcType}${r"}"} 
${"\t"}${"\t"}${"\t"}</if>			
			</#list>
${"\t"}${"\t"}</where>		
${"\t"}</select>

${"\t"}<select id="pageTotal" resultType="long" parameterType="${beanQueryVo}">
${"\t"}${"\t"}SELECT COUNT(1) FROM ${config.tblName}
${"\t"}${"\t"}<where>
<#list columnList as column>
${"\t"}${"\t"}${"\t"}<if test="${column.javaPropertyName} != null and ${column.javaPropertyName} !='' ">
${"\t"}${"\t"}${"\t"}${"\t"}AND	${column.dbColumnName} = ${r"#{"}${column.javaPropertyName}, jdbcType=${column.mybatisJdbcType}${r"}"}
${"\t"}${"\t"}${"\t"}</if>			
</#list>
${"\t"}${"\t"}</where>
${"\t"}</select>
</mapper>
